package com.mmd.common.enums;

//0-正常 1-已冻结 2-审核中 3-审核不通过
public enum UserStatusEnums {
	normal(0,"正常"),
	freeze(1,"已冻结"),
	auditing(2,"审核中"),
	auditfail(3,"审核不通过");

	private UserStatusEnums(Integer code, String name) {
		this.code = code;
		this.name = name;
	}
	
	public static UserStatusEnums getStatusEnum(Integer code){
		UserStatusEnums[] enumArr = UserStatusEnums.values();
		for (UserStatusEnums e : enumArr){
			if (code.equals(e.getCode())){
				return e;
			}
		}
		return null;
	}
	
	private Integer code;
	private String name;
	
	public Integer getCode() {
		return code;
	}
	public String getName() {
		return name;
	}
}
